package com.atguigu.eduservice.controller;

import com.atguigu.commonutils.Result;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/eduservice/user")
public class EduLoginController {

    @PostMapping("/login")
    public Result login() {
        return Result.ok().data("token","admin");
    }

    @GetMapping("/info")
    public Result info() {
        return Result.ok().data("roles","[admin]").data("name","admin").
                data("avatar","http://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1598435853599&di=9fc7739e54870d65ebf505554dfc0096&imgtype=0&src=http%3A%2F%2Fimgsrc.baidu.com%2Fforum%2Fw%3D580%2Fsign%3D36d8969d21381f309e198da199034c67%2F83a0d0a20cf431ad6318e79c4236acaf2fdd9860.jpg");
    }
}
